import 'package:efood_multivendor/helper/size_config.dart';
import 'package:efood_multivendor/util/dimensions.dart';
import 'package:efood_multivendor/util/images.dart';
import 'package:efood_multivendor/util/styles.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';

class NoDataScreen extends StatelessWidget {
  final bool isCart;
  final String text;
  final String images;
  final bool isTransaction;
  NoDataScreen(
      {required this.text,
      this.isCart = false,
      this.images = '',
      this.isTransaction = false});

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.all(Dimensions.PADDING_SIZE_LARGE),
      child: Column(
          // mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            SizedBox(
              height: 5.h,
            ),
            isTransaction == false
                ? Image.asset(
                    images.isEmpty
                        ? isCart
                            ? Images.empty_cart
                            : Images.empty_box
                        : images,
                    width: MediaQuery.of(context).size.height * 0.22,
                    height: MediaQuery.of(context).size.height * 0.22,
                  )
                : Image.asset(
                    'assets/image/Frame.png',
                    width: MediaQuery.of(context).size.height * 0.22,
                    height: MediaQuery.of(context).size.height * 0.22,
                    // color: Colors.grey,
                  ),
            SizedBox(
              height: 5.h,
            ),
            Text(
              isCart ? 'cart_is_empty'.tr : text,
              style: sfMedium.copyWith(
                  fontSize: 2.1.h, color: Theme.of(context).disabledColor),
              textAlign: TextAlign.center,
            ),
          ]),
    );
  }
}
